import request from "@/utils/request";

export const articleList = data => {
  return request.get('/admin/interview/query', {
    params: data
  })
}

export const createArticle = data => {
  return request.post('/admin/interview/create', data)
}

// 删除方法
export const removeArticle = (id) => {
  // return request.delete('/admin/interview/remove', {
  //   data: { id }
  // })
  return request({
    method: 'DELETE',
    url: '/admin/interview/remove',
    data: { id }
  })
}

export const getArticleDetail = id => {
  return request.get('/admin/interview/show', {
    params: {
      id
    }
  })
}

export const updateArticle = data => {
  return request.put('/admin/interview/update', data)
}